#include "Parser.h"
#include "Scanner.h"
#include "Node.h"

Parser::Parser(Scanner& scanner) : scanner_(scanner), tree_(nullptr) {
}
void Parser::Parse() {
	Expr();
}
double Parser::Calculator() const {
	return 0.0;
}

Node* Parser::Expr() {
	Node* node = Term();
	EToken token = scanner_.Token();
	if (token == TOKEN_PLUS) {
		scanner_.Accept();
		Node* nodeRight = Expr();
		node = new AddNode(node, nodeRight);
	}
}
Node* Parser::Term() {

}
Node* Parser::Factor() {

}